3.7.47 \(\int \frac {\sqrt {x}}{\sqrt {1-x}} \, dx\) [647]

Optimal. Leaf size=27 \[ -\sqrt {1-x} \sqrt {x}-\frac {1}{2} \sin ^{-1}(1-2 x) \]

[Out]

1/2*arcsin(-1+2*x)-(1-x)^(1/2)*x^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {52, 55, 633, 222} \begin {gather*} -\frac {1}{2} \text {ArcSin}(1-2 x)-\sqrt {1-x} \sqrt {x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[x]/Sqrt[1 - x],x]

[Out]

-(Sqrt[1 - x]*Sqrt[x]) - ArcSin[1 - 2*x]/2

Rule 52

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^n/(b*(
m + n + 1))), x] + Dist[n*((b*c - a*d)/(b*(m + n + 1))), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 55

Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]), x_Symbol] :> Int[1/Sqrt[a*c - b*(a - c)*x - b^2*x^2]
, x] /; FreeQ[{a, b, c, d}, x] && EqQ[b + d, 0] && GtQ[a + c, 0]

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 633

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dist[1/(2*c*(-4*(c/(b^2 - 4*a*c)))^p), Subst[Int[Si
mp[1 - x^2/(b^2 - 4*a*c), x]^p, x], x, b + 2*c*x], x] /; FreeQ[{a, b, c, p}, x] && GtQ[4*a - b^2/c, 0]

Rubi steps

\begin {align*} \int \frac {\sqrt {x}}{\sqrt {1-x}} \, dx &=-\sqrt {1-x} \sqrt {x}+\frac {1}{2} \int \frac {1}{\sqrt {1-x} \sqrt {x}} \, dx\\ &=-\sqrt {1-x} \sqrt {x}+\frac {1}{2} \int \frac {1}{\sqrt {x-x^2}} \, dx\\ &=-\sqrt {1-x} \sqrt {x}-\frac {1}{2} \text {Subst}\left (\int \frac {1}{\sqrt {1-x^2}} \, dx,x,1-2 x\right )\\ &=-\sqrt {1-x} \sqrt {x}-\frac {1}{2} \sin ^{-1}(1-2 x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 35, normalized size = 1.30 \begin {gather*} -\sqrt {-((-1+x) x)}+2 \tan ^{-1}\left (\frac {\sqrt {x}}{-1+\sqrt {1-x}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[x]/Sqrt[1 - x],x]

[Out]

-Sqrt[-((-1 + x)*x)] + 2*ArcTan[Sqrt[x]/(-1 + Sqrt[1 - x])]

________________________________________________________________________________________

Maple [A]
time = 0.13, size = 41, normalized size = 1.52

method result size
meijerg \(\frac {i \left (i \sqrt {\pi }\, \sqrt {x}\, \sqrt {1-x}-i \sqrt {\pi }\, \arcsin \left (\sqrt {x}\right )\right )}{\sqrt {\pi }}\) \(34\)
default \(-\sqrt {1-x}\, \sqrt {x}+\frac {\sqrt {x \left (1-x \right )}\, \arcsin \left (2 x -1\right )}{2 \sqrt {x}\, \sqrt {1-x}}\) \(41\)
risch \(\frac {\sqrt {x}\, \left (-1+x \right ) \sqrt {x \left (1-x \right )}}{\sqrt {-x \left (-1+x \right )}\, \sqrt {1-x}}+\frac {\sqrt {x \left (1-x \right )}\, \arcsin \left (2 x -1\right )}{2 \sqrt {x}\, \sqrt {1-x}}\) \(60\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(1/2)/(1-x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-(1-x)^(1/2)*x^(1/2)+1/2*(x*(1-x))^(1/2)/x^(1/2)/(1-x)^(1/2)*arcsin(2*x-1)

________________________________________________________________________________________

Maxima [A]
time = 0.49, size = 37, normalized size = 1.37 \begin {gather*} \frac {\sqrt {-x + 1}}{\sqrt {x} {\left (\frac {x - 1}{x} - 1\right )}} - \arctan \left (\frac {\sqrt {-x + 1}}{\sqrt {x}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(1/2)/(1-x)^(1/2),x, algorithm="maxima")

[Out]

sqrt(-x + 1)/(sqrt(x)*((x - 1)/x - 1)) - arctan(sqrt(-x + 1)/sqrt(x))

________________________________________________________________________________________

Fricas [A]
time = 1.01, size = 27, normalized size = 1.00 \begin {gather*} -\sqrt {x} \sqrt {-x + 1} - \arctan \left (\frac {\sqrt {-x + 1}}{\sqrt {x}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(1/2)/(1-x)^(1/2),x, algorithm="fricas")

[Out]

-sqrt(x)*sqrt(-x + 1) - arctan(sqrt(-x + 1)/sqrt(x))

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 0.85, size = 54, normalized size = 2.00 \begin {gather*} \begin {cases} - i \sqrt {x} \sqrt {x - 1} - i \operatorname {acosh}{\left (\sqrt {x} \right )} & \text {for}\: \left |{x}\right | > 1 \\\frac {x^{\frac {3}{2}}}{\sqrt {1 - x}} - \frac {\sqrt {x}}{\sqrt {1 - x}} + \operatorname {asin}{\left (\sqrt {x} \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(1/2)/(1-x)**(1/2),x)

[Out]

Piecewise((-I*sqrt(x)*sqrt(x - 1) - I*acosh(sqrt(x)), Abs(x) > 1), (x**(3/2)/sqrt(1 - x) - sqrt(x)/sqrt(1 - x)
 + asin(sqrt(x)), True))

________________________________________________________________________________________

Giac [A]
time = 2.27, size = 17, normalized size = 0.63 \begin {gather*} -\sqrt {x} \sqrt {-x + 1} + \arcsin \left (\sqrt {x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(1/2)/(1-x)^(1/2),x, algorithm="giac")

[Out]

-sqrt(x)*sqrt(-x + 1) + arcsin(sqrt(x))

________________________________________________________________________________________

Mupad [B]
time = 0.57, size = 31, normalized size = 1.15 \begin {gather*} 2\,\mathrm {atan}\left (\frac {\sqrt {x}}{\sqrt {1-x}-1}\right )-\sqrt {x}\,\sqrt {1-x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(1/2)/(1 - x)^(1/2),x)

[Out]

2*atan(x^(1/2)/((1 - x)^(1/2) - 1)) - x^(1/2)*(1 - x)^(1/2)

________________________________________________________________________________________